package ${basepackage}.manager;

import ${basepackage}.manager.exception.ServiceException;
import ${basepackage}.model.criteria.${databaseNameCamel}.${table.generateClassName}Criteria;
import ${basepackage}.model.vo.${databaseNameCamel}.${table.unCapGenerateClassName}.Add${table.generateClassName}Form;
import ${basepackage}.model.vo.${databaseNameCamel}.${table.unCapGenerateClassName}.${table.generateClassName}Row;
import ${basepackage}.model.vo.${databaseNameCamel}.${table.unCapGenerateClassName}.Update${table.generateClassName}Form;
import ${basepackage}.model.vo.common.Page;

public interface ${table.generateClassName}Manager {

	/**
	 * 根据ID删除.
	 * 
	 * @param ${table.primaryKey.name?uncap_first}
	 * @return
	 * @throws ServiceException
	 */
	public boolean delete(${table.primaryKey.type} ${table.primaryKey.name?uncap_first}) throws ServiceException;

	/**
	 * 根据查询条件分页获取列表.
	 * 
	 * @param criteria
	 * @param offset
	 * @param limit
	 * @return
	 * @throws ServiceException
	 */
	public Page<${table.generateClassName}Row> get${table.generateClassName}s(
			${table.generateClassName}Criteria criteria, int offset, int limit)
			throws ServiceException;

	/**
	 * 添加.
	 * 
	 * @param add${table.generateClassName}Form
	 * @return
	 * @throws ServiceException
	 */
	public ${table.generateClassName}Row add${table.generateClassName}(
			Add${table.generateClassName}Form add${table.generateClassName}Form) throws ServiceException;

	/**
	 * 更新.
	 * 
	 * @param update${table.generateClassName}Form
	 * @return
	 * @throws ServiceException
	 */
	public ${table.generateClassName}Row update${table.generateClassName}(
			Update${table.generateClassName}Form update${table.generateClassName}Form)
			throws ServiceException;
}
